package com.springboot.demo.util.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description：
 * @Date： Created in 2021/12/30
 * @author： jianbin.lei
 * @Auto： <a href="mailto:493168771@qq.com">jianbin.lei</a>
 */
@Getter
@AllArgsConstructor
public enum Code {

    /// 业务逻辑处理正常
    SUCCESS(200, "Success")


    ,DB_PROCEED_ERROR(30000,"Error updating database. Cause: java.sql.SQLException:{0}")

    ;

    public String message;

    private long code;

    Code(long code, String message) {
        this.code = code;
        this.message = message;
    }

    public long getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
